<template>
  <div ref="echarts" style="width: 100%; height: 100%"></div>
  <el-popover
    :visible="visible"
    placement="bottom-right"
    title="配方预测分析"
    :width="600"
    offset="100"
    hide-after="200"
    trigger="click"
    content="系统提供预测模型，根据各品牌执行配方和烟叶库存信息，遵循如优先保障某品牌生产、保障某品牌生产数量、预留某些烟叶不准使用（原料部让售）等原则，计算出不同生产点各品牌当前配方的产量。通过“余缺查询”的功能，为产品维护室的人员及时进行烟叶替换或者配方调整提供预警。" />
</template>
  
<script>
import * as echarts from "echarts";

export default {
  mounted() {
    this.initChart();
  },
  methods: {
    initChart() {
      const myChart = echarts.init(this.$refs.echarts);
      const option = {
        title: {
          text: "配方预测分析",
          left: "40%",
          top: "10px",
        },
        xAxis: {
          type: "category",
          data: ["R100001", "R100002", "R100003", "R100004", "R100005", "R100006", "R100007"],
        },
        yAxis: {
          type: "value",
        },
        series: [
          {
            data: [
              120,
              {
                value: 20,
                itemStyle: {
                  color: "#a90000",
                },
              },
              150,
              80,
              70,
              110,
              130,
            ],
            type: "bar",
          },
        ],
      };
      myChart.setOption(option);
    },
  },
};
</script>
  